<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Admin extends CI_Controller {
    public $admin;
    function get_admin(){
        $this->admin = $this->session->userdata('admin');
        if(empty($this->admin) ){
            t_( "<script> location.href = '/admin_login';</script>" );
            exit();
        }
    }
    function __construct()
    {
        parent::__construct();
        $this->load->library('session');
        $this->load->database();
        $this->get_admin();
    }
    function index(){
        $this->load->view('admin/index');
    }
    function left(){
        $this->load->view('admin/left');
    }
    function top(){
        $this->load->view('admin/top');
    }
    function admin_panel(){
        $this->load->view('admin/admin_panel');
    }
    function user_list(){
        $this->load->view('admin/list/user');
    }
    function ad_list(){
        $this->load->view('admin/list/ad');
    }
    function user_fee_list(){
        $this->load->view('admin/list/user_fee');
    }
    function user_withdraw_list(){
        $this->load->view('admin/list/user_withdraw');
    }
    function adaccount_list(){
        $this->load->view('admin/list/adaccount');
    }
    function articleaccount_list(){
        $this->load->view('admin/list/articleaccount');
    }
    function article_list(){
        $this->load->view('admin/list/article');
    }
}
